package demo.dao;

import demo.model.Account;
import demo.utils.JdbcPage;
import org.springframework.stereotype.Component;

/**
 * Created by IntelliJ IDEA.
 * User: zigang.wang
 * Date: 12-3-19
 * Time: 上午10:28
 * To change this template use File | Settings | File Templates.
 */
@Component
public class AccountDao extends BaseDao<Account>{

    public JdbcPage<Account> listAccount(int curPage, int pageSize, int status) {
        String sql = "select * from demo_account where status = ? order by create_on desc";
        return doQueryPage(sql, curPage, pageSize, 0, status);
    }
}
